import java.util.Random;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        //2、定义一个类，其功能实现：随机产生10个加法计算题，
        // 加数是两个1到15之间的整数，通过输入数据给出计算结果，从而最终显示正确计算结果的个数
        RandoM randoM = new RandoM();
        Scanner scanner = new Scanner(System.in);
        int ans=0;
        for (int i = 0; i < 10; i++) {
            int a = randoM.fun();
            int b = scanner.nextInt();
            if( a == b){
                ans++;
            }
        }
        System.out.println("最终对了" + ans + "个");
    }
}

class RandoM{

    Random random = new Random();
    public int fun(){
        int a,b;
        a =  (int)random.nextInt(15) + 1;
        b =  (int)random.nextInt(15) + 1;
        System.out.print(a + "+" + b + "=");
        return a + b;
    }
}
